#include "stdafx.h"
#include "SpinExample.h"

void SpinExample::loadFile(const String& fileName, FCView *view){
    FCUIXml::loadFile(fileName, view);
    //获取第二页
    FCTabPage *tabPage = getTabPage(L"TabPage2");
    FCSpin *spin3 = new FCSpin();
    FCPoint point = {100,100};
    spin3->setLocation(point);
    FCSize size = {100,20};
    spin3->setSize(size);
    tabPage->addView(spin3);
    spin3->setValue(33);

    FCButton *button1 = getButton(L"Button");
    button1->addEvent((FCTouchEventCallBack*)this, FCEventID_Click, this);
}

void SpinExample::callTouchEvent(String eventName, Object sender, FCTouchInfo touchInfo, Object invoke){
    FCSpin *spin = getSpin(L"Spin");
    FCSpin *spin2 = getSpin(L"Spin2");
    double value1 = spin->getValue();
    double value2 = spin2->getValue();
}
